<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>后台登录</title>
    <link rel="stylesheet" href="css/login.css" type="text/css">
    <script type="text/javascript" src="js/jquery-3.4.1.min.js"></script>
    <script type="text/javascript" src="js/main.js"></script>
</head>

<body onkeydown="onkeyEnter()">
    <div id="login">
        <div id="main">
            <h1>login</h1>
            <form action="" method="" id="loginForm">
                <div>
                    <div class="username">
                        <input type="text" name="user" placeholder="用户名" id="user">
                    </div>
                    <div class="password">
                        <input type="password" name="password" placeholder="密码" id="password">
                    </div>
                    <div class="login_but">
                        <a href="javascript:" class="login_a" onclick="login()">登录</a>
                    </div>
                </div>
            </form>
        </div>
    </div>

    <script>
        function onkeyEnter() {
            if (event.keyCode == 13) {
                login();
            }
        }
    </script>
</body>

</html>